package com.dome.mp.server.core;

/**
 * <p>服务异常</p>
 *
 * @author TanXin
 * @date 2021/3/13 15:57
 */
public class ServiceException extends RuntimeException {

    private ResultCode resultCode;

    public ResultCode getResultCode() {
        return resultCode;
    }

    public ServiceException() {
        super();
    }

    public ServiceException(ResultCode resultCode) {
        super(resultCode.message());
        this.resultCode = resultCode;
    }

    public ServiceException(String message, Throwable cause) {
        super(message, cause);
    }

    public ServiceException(Throwable cause) {
        super(cause);
    }

    protected ServiceException(String message, Throwable cause, boolean enableSuppression, boolean writableStackTrace) {
        super(message, cause, enableSuppression, writableStackTrace);
    }
}
